//
//  SEGWebViewLoadManager.h
//  TWebKit
//
//  Created by 山刘 on 2018/11/14.
//  Copyright © 2018年 山刘. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>

#if __has_include(<Commom/SEGModel.h>)
#import <Commom/SEGModel.h>
#else
#import "SEGModel.h"
#endif

#if __has_include(<Commom/SEGProfileManager.h>)
#import <Commom/SEGProfileManager.h>
#else
#import "SEGProfileManager.h"
#endif

#if __has_include(<Commom/YYBaseHeader.h>)
#import <Commom/YYBaseHeader.h>
#else
#import "YYBaseHeader.h"
#endif

#if __has_include(<Commom/SEGServerManager.h>)
#import <Commom/SEGServerManager.h>
#else
#import "SEGServerManager.h"
#endif

#if __has_include(<Commom/SEGCKeyChainStore.h>)
#import <Commom/SEGCKeyChainStore.h>
#else
#import "SEGCKeyChainStore.h"
#endif

NS_ASSUME_NONNULL_BEGIN

@interface SEGWebViewLoadManager : NSObject

+(instancetype)sharedManager;

/**
 参数替换属性
 */
@property (nonatomic, strong)NSMutableDictionary *params;

/**
 通过传入的url地址生成JavaScript字符串
 
 @param urlString 格式：{"para":["userId","accessToken","deviceId","communityId","source","versionCode"],"fn":"uhomeNativeApi.getUserInfoCb"}
 @return js注入函数：uhomeNativeApi.getUserInfoCb({"deviceId":"B56D14B7-D3E8-492E-9D2D-8AE484FF64B7","source":"2","userId":"452613","communityId":"67"})
 */
+(NSString*)segJavaScriptStringFromUrlString:(NSString*)urlString;

/**
 对url地址进行业务参数替换
 
 @param urlString 服务器下发的url地址:parking/index.html?token=segi_token&deviceid=segi_deviceid&version=segi_version
 @return 参数替换后的url地址:parking/index.html?token=2222&deviceid=B56D14B7-D3E8-492E-9D2D-8AE484FF64B7&version=4.6.0
 */
+(NSString*)segReplaceUrlStringWithUrlString:(NSString*)urlString;

//获取本地路径
+ (NSString *)getLocalPathByPath:(NSString *)path;
@end

NS_ASSUME_NONNULL_END
